home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / gift40b7.arc / GIFTEST.DOC < prev    next >
Text File  |  1992-01-04  |  14KB  |  293 lines

  1.                               GIFtest 4.0ß
  2.                   CopyRight 1991 by Dave Navarro, Jr.
  3.  
  4. What is GIFtest?
  5.  
  6.      GIFtest is a command line utility to test GIF files to make sure
  7.      they are valid.  GIFtest scans the GIF header to make sure that
  8.      all the information stored is valid, and then scans the image
  9.      it self to make sure it's all there.  If everything is found in
  10.      order, GIFtest exits without any error messages or error levels.
  11.      However, if there is a problem with the GIF, GIFtest exits with
  12.      an error message letting you know what's wrong, and exits with
  13.      an error level.
  14.  
  15.      GIFtest is also capable of letting you know if a GIF has been
  16.      GIFLITE'd, has any extra bytes left by older transfer protocols,
  17.      modifying a BBS description to include the resolution of the GIF
  18.      (ProDooor and PCBoard), forcing all GIFs to be private uploads on
  19.      PCBoard and ProDoor BBSes, and rejecting GIFs that do not meet a
  20.      minimum definable resolution.
  21.  
  22.      When GIFs are transfered from user to user, or user to BBS or BBS
  23.      to user, their protocol sends files in packet sizes ranging from
  24.      128 bytes to 4k, and when they reach the end of a file, if the
  25.      remaining bytes do not equal the packet size, the packet is "padded"
  26.      with extra charactors to make it equal to the pack size.  Unfortunately,
  27.      these bytes are not trimmed off when recieved by older protocols.  It
  28.      doesn't effect the file itself, but after several hundred file transfers,
  29.      you could end up with several hundred "K" of wasted space.  GIFtest now
  30.      automatically trims these extra bytes from GIF files.
  31.  
  32.      GIFtest also conforms 100% to the GIF87a and GIF89a standards, so
  33.      will also process GIFs that contain "extensions".  These extensions
  34.      are also tested to make sure that all the "data blocks" have the
  35.      correct lengths and are valid.
  36.  
  37. NEW: Byte trimming is instantanious and no longer causes GIFtest to test
  38.      the GIF more than once.
  39.  
  40.      To register GIFtest, please send a check or money order for $15
  41.      to:
  42.             Dave Navarro, Jr.
  43.             64-38 Admiral Ave
  44.             Middle Village, NY 11379
  45.  
  46.      Please used the enclosed ORDER.FRM file.
  47.  
  48. Acknowledgements:
  49.  
  50.      The Graphics Interchange Format(c) is the Copyright property of
  51.      Compuserve Incorporated.  GIF(sm) is a Service Mark property of
  52.      Computerve Incorporated.
  53.  
  54.      Many thanks to the following individuals who have helped with the
  55.      testing of GIFtest and whose suggestions have helped GIFtest to
  56.      grow:
  57.  
  58.         Gary Foreman, SysOp of Another Dimension BBS
  59.         Thomas Enstall, SysOp of Hard Times BBS
  60.         Jerry Claxton, SysOp of Woodcreek BBS
  61.         Allen Legatzke, SysOp of Sattelite BBS
  62.         Chuck Valiceck, SysOp Suburban Software BBS
  63.         Max Bernard, SysOp of Taste BBS
  64.         Steve Rimmer, Author of "Bit-Mapped Graphics"
  65.  
  66. Support:
  67.  
  68.      The author can be reached through US Mail at the same address used
  69.      for registration, or through "electronic mail" left on The Bard's
  70.      Lair BBS at 718-381-3651.  The author also monitors the SHAREWARE
  71.      conference in the Intelec International Network of BBSs, and the
  72.      SHAREWARE conference in the MetroLink/RelayNet International
  73.      Network of BBSs.
  74.  
  75.      Because of the high cost of voice support, and the low cost of
  76.      GIFtest, voice support from the author is not available.  If it's
  77.      absolutely important that you recieve voice support, leave an
  78.      electronic message to the author on The Bard's Lair BBS and you
  79.      will recieve a "collect" call as soon as humanly possible.
  80.  
  81. How to use GIFtest:
  82.  
  83.     GIFtest 4.0ß has the following options:
  84.     Usage: GIFTEST filename.gif [option1] [option2] etc..
  85.        /A            -  Force private upload
  86.        /B:n          -  BBS type
  87.                         0 - None [default]
  88.                         1 - ProDoor, 2 - PCBoard
  89.        /C:[filename] -  Use options in configuration file
  90.        /D            -  Duplicate checking using 32 bit CRC's
  91.        /E            -  Erase Invalid GIF's
  92.        /F:filename   -  Name of Description file
  93.        /L:[filename] -  Keep a log of GIFs
  94.        /M:nnXnnXnn   -  Minimum resolution to accept
  95.        /N:n          -  Node Number (requires GIFTEST.CFG)
  96.        /P:n          -  COM port numer [1 - 4]
  97.        /R:n          -  Position of resolution in description
  98.                         0 - First word on first line
  99.                         1 - Last word on first line [default]
  100.                         2 - Last word on last line
  101.                         3 - Last line by itself
  102.        /S            -  Skip GIF testing
  103.        /T:n          -  Type of resolution used
  104.                         1 - Enclosed with brackets [default]
  105.                         2 - No brackets
  106.        /U            -  Convert description to uppercase
  107.     
  108.     To use GIFtest, just type "GIFTEST filename.gif" at the DOS prompt
  109.     and GIFtest will tell you the size of the GIF and whether or not it
  110.     passed testing.
  111.  
  112.     GIFtest will also exit with one of the following Errorlevels to
  113.     help you identify what happened in batch files, or programs that
  114.     use GIFtest (such as ZipLab).
  115.  
  116.     Result                                                        ErrorLevel
  117.     GIF passed all tests                                               0
  118.     Invalid Header or Incomplete Image                                 1
  119.     File Not Found                                                     5
  120.     Invalid Command Line Option                                        5
  121.     GIFLITE'd                  [passed all other tests]               10
  122.     Failed Minumum Resolution  [passed other tests]                   20
  123.     Duplicate CRC found        [passed other tests]                   25
  124.     No Description Found       [passed all other tests]               60
  125.     Unknown Error              [programmer goofed]                   255
  126.  
  127. Making GIFs Private: /A
  128.  
  129.    Sometimes, sysops will have problems where users will upload adult
  130.    GIFs to a public file area.  You can remedy this several different
  131.    ways..  You can make all uploads private, you can get nasty and delete
  132.    the offending user(s), or you can use GIFtest to force all GIFs to be
  133.    private uploads, leaving the rest of your files alone using the "/A"
  134.    switch on the command line or in GIFTEST.CFG..
  135.  
  136.    WARNING!  This only works with ProDoor and PCBoard systems which use
  137.    GIFtest to modify the description.
  138.  
  139.  
  140. Modifying Descriptions: /B:n
  141.  
  142.    The only feature of the original GIFtest was to place the resolution
  143.    of the GIF into the description typed by users of ProDoor where I
  144.    wanted it.  Since then, many sysops have contacted me, asking that
  145.    I allow the same time of feature for their BBS type as well.
  146.    Unfortunately, the only people to give me the necessary information
  147.    have been PCBoard SysOps, so starting with 4.0, GIFtest supports
  148.    descriptions for ProDoor and PCBoard.
  149.  
  150.    However, GIFtest doesn't know which type of BBS is running,
  151.    so you'll need to tell it with the /B parameter.
  152.     /B:0 means ignore ProDoor and PCboard descriptions, just test
  153.         the GIF
  154.     /B:1 means your running ProDoor and search for $DOOR.NAM to
  155.          modify the description
  156.     /B:2 means your running PCBoard and search for UPDESC[.N] to
  157.          modify the description
  158.  
  159.    If you use the /B:n option and GIFtest does not find the description file
  160.    or does not find the description inside the description file for the GIF
  161.    and the GIF passes all tests, GIFtest will exit with ErrorLevel 40.
  162.  
  163.    ProDoor Descriptions:
  164.  
  165.      ProDoor stores the name and descriptions of uploaded files in a file
  166.      called $DOOR.NAM which is kept in the default directory for each node.
  167.      For example, if your PRODOOR batch file called ProDoor with the options
  168.      PRODOOR PROD.CNF C:\PCB, then $DOOR.NAM will be found in the directory
  169.      C:\PCB.  So, you can call GIFtest with:
  170.  
  171.          GIFTEST %1 /B:1 /F:C:\PCB\$DOOR.NAM
  172.  
  173.      Which will tell GIFtest that the description file C:\PCB\$DOOR.NAM
  174.      uses the ProDoor format for storing descriptions.
  175.  
  176.    PCBoard Descriptions:
  177.  
  178.      PCBoard stores the name and descriptions of uploaded files in a file
  179.      called UPDESC[.n], where the [.n] is the node number if you are running
  180.      a multinode BBS.  So node 1 would be UPDESC.1, node 2 is UPDESC.2, etc..
  181.      The location of this file depends on how you have PCBOARD.DAT setup,
  182.      if you have specified a "work" directory in PCBSETUP, then this file
  183.      is placed in that work directory.  If not, then it is kept im the
  184.      default PCB directory for each node.  If you are using PCBoard 14.5a
  185.      the easiest way to find the UPDESC[.n] file for each node is to put
  186.  
  187.           echo %3 > UPDESC.LOC
  188.  
  189.      at the top of your PCBTEST.BAT file.  This will echo the third parameter
  190.      (the name and location of the UPDESC[.n] file) to the file UPDESC.LOC
  191.      which you can then type to see where PCBoard is keeping it.  This is
  192.      only important for you to know if you are running GIFtest from within
  193.      a program like ZipLab.  If you are calling GIFtest directly from
  194.      within your PCBTEST file, you need only add the option "/F:%3" to the
  195.      command line and PCBoard will pass the name and location of the
  196.      description file to GIFtest for you.
  197.  
  198.      WARNING!:  Do NOT use the name of any of your DIRx files, especially
  199.      your upload directory file, this will get destroyed.
  200.  
  201.  
  202. Configuration File: /C:[filename]
  203.  
  204.    Some programs like ZipLab shell out to GIFtest in order to test GIF
  205.    files...however, they may not allow you to include the defaults you
  206.    want to test the GIF with.  To help with this, GIFTEST will let you
  207.    store all your defaults into a config file.  The default name is
  208.    GIFTEST.CFG, but you can pass any filename on the command line with
  209.    the "/C:[filename]" switch.  If a filename is not specified, then
  210.    GIFTEST.CFG is assumed.
  211.  
  212.    The top line of the configuration file is the DOS command line
  213.    you want to use for GIFtest.  Each line after that is the
  214.    name and location for the description file for the BBS you run
  215.    for each node.
  216.  
  217.      Example:
  218.        /E/L                       ;Erase bad GIFs, Keep a log file
  219.        C:\PRO\NODE1\$DOOR.NAM     ;location of description file for node 1
  220.        C:\PRO\NODE2\$DOOR.NAM     ;location of description file for node 2
  221.  
  222.    To get the current node number, GIFtest either expects it on the command
  223.    line [see /N], or expects to find the environment variable "PCBNODE=n"
  224.    where "n" is the node number.
  225.  
  226.    Any options found in the configuration file take precedence over command
  227.    line parameters.  If you have /B:0 on the command line, but GIFtest finds
  228.    /B:1 in the configuration file, then GIFtest will use the /B:1 option.
  229.  
  230.  
  231. Checking for Duplicate Files: /D
  232.  
  233.    A major problem with GIFs today is that users will rename them and
  234.    re-upload them to a BBS to get upload credits.  Before GIFtest, there
  235.    was no way to test if a file was actually a GIF, however, even if the
  236.    file is a GIF, it could be a duplicate file.  To combat this, GIFtest
  237.    calculates a 32bit CRC for each uploaded GIF using the same method as
  238.    PKZIP and ARJ and places that CRC into your GIFLOG file (if you keep
  239.    one).  You can then use the "/D" parameter to have GIFtest scan this
  240.    log for a duplicate CRC and return an errorlevel if one is found.
  241.  
  242.    WARNING!:  GIFtest does NOT do duplicate checking by default, but it
  243.    will log all CRC's of complete GIFs if they pass testing.
  244.  
  245.  
  246. Erasing bad GIFs: /E
  247.  
  248.    While GIFtest does exit with an Errorlevel to indicate the failure of a
  249.    GIF to pass all tests, some users don't with to catch these errors in a
  250.    BATch file to see if the file needs to be deleted.
  251.  
  252.    The /E option will erase any GIF not passing all of the tests.
  253.  
  254.    If GIFtest is unable to erase the GIF, it will exit with errorlevel set
  255.    to 255 (programmer goof).
  256.  
  257.  
  258. Passing the description filename: /F:filename
  259.  
  260.    You can use the "/F:filename" parameter to pass the name and location
  261.    of the description file for GIFtest to alter.  This is especially useful
  262.    with PCBoard 14.5a multi-node systems where you are calling GIFtest
  263.    directly from PCBTEST.BAT and can pass the %3 parameter from PCBoard
  264.    directly to GIFtest, such as:
  265.  
  266.       GIFTEST %1 /B:2 /F:%3
  267.  
  268.    WARNING!:  This only works with PCBoard and ProDoor descriptions.
  269.  
  270.  
  271. Log all checked GIFs: /L:[logfilename]
  272.  
  273.    GIFtest can log all tested GIFs to a file which can help you in
  274.    tracking duplicates, resolutions, and user activities.  If you
  275.    don't specify a filename, the name GIFLOG is used.
  276.  
  277.    The format for the log file is:
  278.  
  279.     FILENAME.GIF 999999 01-01-91 [9999xx9999x999] 9999 OK GL FFFFFFFF
  280.     ─────┬────── ──┬─── ────┬─── ────────┬─────── ─┬── ┌─ ┌─ ┌───────
  281.          │         │        │            │         │   │  │  └ 32 bit CRC
  282.          │         │        │            │         │   │  └ GIFLITE'd
  283.          │         │        │            │         │   └ Status
  284.          │         │        │            │         │       OK
  285.          │         │        │            │         │       IM Incomplete Image
  286.          │         │        │            │         │       IV Invalid Header
  287.          │         │        │            │         └ Trimmed Bytes
  288.          │         │        │            └ Resolution
  289.          │         │        └ Current Date
  290.          │         └ File Size
  291.          └ File Name
  292.  
  293.